package com.longteng.testng;

import java.lang.annotation.Annotation;
import java.lang.reflect.Parameter;

/**
 * Created by sky on 15-12-25
 */
public class MethodParam {

    private Parameter parameter;

    private String name;

    public MethodParam(String name){
        this.name = name;
    }


    public String getName() {
        return name;
    }


    public Class<?> getType() {
        return parameter.getType();
    }

    public Parameter getParameter() {
        return parameter;
    }

    public void setParameter(Parameter parameter){
        this.parameter = parameter;
    }

    public <T extends Annotation> T getAnnotation(Class<T> clz){
        return this.parameter.getAnnotation(clz);
    }
}
